const loginValidator = (ctx, next) => {
    const {username, password} = ctx.request.body;
    if (!username || !password) {
        ctx.body = {
            code: 400,
            message: '用户名或密码不能为空'
        }
        return
    }
    return next()
}
module.exports = {
    loginValidator
}
